import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;
import java.util.Map;


public class MeiCan {

    public static void main(String[] args) throws IOException {
        Connection.Response response = Jsoup.connect("https://meican.com/account/directlogin").method(Connection.Method.POST)
                .data("username", "liuqingsong@duiba.com.cn")
                .data("loginType", "username")
                .data("password","123456")
                .data("remember","true")
                .userAgent("Mozilla").execute();

        Map<String,String> map = response.cookies();
        map.forEach((k,v)->{
            System.out.println(k+":"+v);
        });

        String url="https://meican.com/index";
        Connection.Response rsp = Jsoup.connect(url).cookies(map).execute();
        System.out.println(rsp.body());
    }
}
